completing teh square method for turning point